package com.efast.dmom.mgmt.job;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import com.efast.cafe.commponent.job.base.AbstractStatefulJobBean;
import com.efast.cafe.commponent.job.bean.ScheduleExecuteLog;
import com.efast.cafe.commponent.log.ext.CafeLogger;
import com.efast.cafe.commponent.log.ext.CafeLoggerFactory;
import com.efast.cafe.framework.spring.SpringContextUtils;
import com.efast.dmom.mgmt.service.les.WindowReplenishmentByCumulativeConsumptionJobService;

/**
 * 窗口补货 ：Window replenishment 累计消耗： Cumulative consumption 窗口补货-按累计消耗
 * 此模式和即时补货完全一样，唯一的区别就是即时补货无窗口时间的概念； 按累计消耗补货，需要到了配置的窗口时间，才会执行组织补货需求。
 * 
 * 代码实现流程：窗口时间路径-路径下库位-库位消耗量-组织需求
 * @author chlp
 */
public class WindowReplenishmentByCumulativeConsumptionJob extends AbstractStatefulJobBean {

	CafeLogger log = CafeLoggerFactory.getLogger(getClass());
	
	
	@Override
	protected void executeInternal(JobExecutionContext context,ScheduleExecuteLog cachelog) throws JobExecutionException {
		log.info("定时任务执行开始--》窗口补货-按累计消耗.................");
		/**
		 *补货任务需求 TW_INV_PAL_MRI
	 	 */
		WindowReplenishmentByCumulativeConsumptionJobService windowReplenishmentByCumulativeConsumptionJobService = SpringContextUtils.getBean(WindowReplenishmentByCumulativeConsumptionJobService.class);
		windowReplenishmentByCumulativeConsumptionJobService.excute();
		log.info("定时任务执行完成--》窗口补货-按累计消耗.................");
	}

}